<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>皓之睿</title>
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <link rel="stylesheet" type="text/css" href="../../static/data/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../static/data/css/mains.css">
    <script type="text/javascript" src="../../static/common/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="../../static/admin/js/jquery.form.min.js"></script>
    <script type="text/javascript" src="../../static/admin/js/tinymce_setup.js"></script>
</head>

<body class="inframe_body">
<div class="breadcrub">人体数据计算</div>

<form method="post" class="release_form">
    <h3>输入数据</h3>
    <div class="form-group"><label>姓 名：</label>
        <input type="text" class="input_txt2" name="name" value="{{ data.name }}">
    </div>
    <div class="form-group"><label>身 高(cm)：</label>
        <input type="text" class="input_txt2" name="height" value="{{ data.height }}">
    </div>
    <div class="form-group"><label>体 重(kg)：</label>
        <input type="text" class="input_txt2" name="weight" value="{{ data.weight }}">
    </div>

    {% if status=='false' %}
        <div class="form-group-error"><label>提示信息: {{ message }}</label>
        </div>
    {% endif %}

    <div class="form-group indent-group line-top">
        <input type="submit" value="计 算" class="confirm">
        <input type="button" value="重 置" class="cancel" onclick="re_set()">
    </div>

    {% if result %}
        <h3>计算结果</h3>
        <div class="form-group"><label>体型分类：</label>
            <input type="text" class="input_txt2" name="shape_type" value="{{ result.shape_type }}" readonly="readonly">
        </div>
        <div class="form-group"><label>颈 围(cm)：</label>
            <input type="text" class="input_txt2" name="neck" value="{{ result.neck }}" readonly="readonly">
        </div>
        <div class="form-group"><label>肩 宽(cm)：</label>
            <input type="text" class="input_txt2" name="shoulder_width" value="{{ result.shoulder_width }}" readonly="readonly">
        </div>
        <div class="form-group"><label>臂 围(cm)：</label>
            <input type="text" class="input_txt2" name="arm" value="{{ result.arm }}" readonly="readonly">
        </div>
        <div class="form-group"><label>臂 长(cm)：</label>
            <input type="text" class="input_txt2" name="arm_length" value="{{ result.arm_length }}" readonly="readonly">
        </div>
        <div class="form-group"><label>胸 围(cm)：</label>
            <input type="text" class="input_txt2" name="chest" value="{{ result.chest }}" readonly="readonly">
        </div>
        <div class="form-group"><label>腰 围(cm)：</label>
            <input type="text" class="input_txt2" name="waist" value="{{ result.waist }}" readonly="readonly">
        </div>
        <div class="form-group"><label>臀 围(cm)：</label>
            <input type="text" class="input_txt2" name="hip" value="{{ result.hip }}" readonly="readonly">
        </div>
        <div class="form-group"><label>大腿围(cm)：</label>
            <input type="text" class="input_txt2" name="thigh" value="{{ result.thigh }}" readonly="readonly">
        </div>

    {% endif %}

</form>

<script>
    // 点击重置，跳转数据计算页面, 清空主句
    function re_set() {
        window.location = '/data_calc'
    }
</script>

</body>
</html>